package educational.cad.model;

public abstract class Package implements Storable, Drawable {

	/**
	 * <<create>>
	 */
	private final int width;
	private final int height;

	protected Package(int width, int height) {
		this.width = width;
		this.height = height;
	}

	public static Package fromXml(String xml) {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	/**
	 * <<properties>>
	 */

	/**
	 * This method returns package width in abstract units.
	 */
	public int width() {
		return width;
	}

	/**
	 * This method returns package height in abstract units.
	 */
	public int height() {
		return height;
	}

	/**
	 * <<pins>>
	 */

	/**
	 * This method defines: is pin placed in the specified position.
	 */
	public boolean hasPinIn(Position position) {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	/**
	 * This method returns the pin from the specified position.
	 */
	public Pin getPinIn(Position position) {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	/**
	 * This method returns all pins located at package.
	 */
	public Pin[] pins() {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	/**
	 * This method defines: whether an user can put the pin in specified position.
	 */
	public boolean isTraversableIn(Position position) {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	/**
	 * This method defines: whether an user can pick up the package in specified position.
	 */
	public boolean isPickableIn(Position position) {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	@Override
	public int hashCode() {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}

	@Override
	public boolean equals(Object another) {
		throw new IllegalStateException("This method must be replaced in the child realeses.");
	}
}

/* A sample change to check up mercurial revsion */
/* This file has been changed */
